package com.woniuxy.movice.mapper;


import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.woniuxy.movice.dto.Page;
import com.woniuxy.movice.entity.Orders;
import com.woniuxy.movice.pojo.Order;

public interface OrdersMapper {

	int insert(Orders record);

	int insertSelective(Orders record);

	Orders selectByPrimaryKey(Integer oid);

	int updateByPrimaryKeySelective(Orders record);


	List<Order> findAllOrder(@Param("uid")Integer uid,@Param("page")Page<Order> page, @Param("state")Integer state);
	
	Order findOrderByID(Integer oid);
	

	int updateByOnum(@Param("order")Orders order);
	
	@Update("update orders set ostate=#{ostate} where onum=#{onumber}")
	int updateOstate(String onumber, int ostate);

	int updatePayState(@Param("order")Orders order);
	
	Order findOrderByOnum(String orderId);


	int updateState(@Param("onum")String orderId,@Param("state")Integer state);
}